//
// @Auther: by wujehy 
// @Email:wujehy@qq.com
// @Data:2020/9/14
// @Time:11:39 上午
//
//

#ifndef GEEJOAN_KEYVALUEMOD_H
#define GEEJOAN_KEYVALUEMOD_H

#include "BaseMod.h"
#include <map>
#include <functional>

namespace GeeJoan
{
    class KeyValueMod : public BaseMod
    {
        using SubTypeFunction = std::function<void(const HanderDataType *hander, StatusCodeTypeEnum &code, std::string &resposeBody)>;
        std::map<uint8_t, SubTypeFunction> m_sub_type_func_map;

        std::map<std::string, std::string> m_key_value_map;
    public:
        void init() override;

        ModTypeEnum mod_type() override;

        void procMessage(const HanderDataType *hander, StatusCodeTypeEnum &code, std::string &resposeBody) override;

    };
}


#endif //GEEJOAN_KEYVALUEMOD_H
